
import { Entity, NgField, NgObject, EntityList, NgList, NgDynamic, DynamicEntity, NgEntity } from '@farris/devkit';

@NgEntity({
    originalCode: "jmtg",
    nodeCode: "jmtgs",
    allowEmpty: true
})
export class JmtgEntity extends Entity {

    @NgField({
        originalDataField: 'ID',
        dataField: 'id',
        primary: true,
        originalDataFieldType: 'String',
        initValue: '',
        path: 'ID',

        validRules: [
            {
                type: 'required',
                constraints: [true],
            },
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    id: string;

    @NgField({
        originalDataField: 'Version',
        dataField: 'version',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'Version',
        enableTimeZone: true,
    })
    version: string;

    @NgField({
        originalDataField: 'MerchantCode',
        dataField: 'merchantCode',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'MerchantCode',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    merchantCode: string;

    @NgField({
        originalDataField: 'MerchantName',
        dataField: 'merchantName',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'MerchantName',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    merchantName: string;

    @NgField({
        originalDataField: 'Adminstrator',
        dataField: 'adminstrator',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'Adminstrator',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    adminstrator: string;

    @NgField({
        originalDataField: 'jmhdbh',
        dataField: 'jmhdbh',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'jmhdbh',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    jmhdbh: string;

    @NgField({
        originalDataField: 'jmhdmc',
        dataField: 'jmhdmc',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'jmhdmc',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    jmhdmc: string;

    @NgField({
        originalDataField: 'jmhdrq',
        dataField: 'jmhdrq',
        originalDataFieldType: 'DateTime',
        initValue: '0001-01-01T00:00:00',
        path: 'jmhdrq',
        enableTimeZone: true,
    })
    jmhdrq: string;

    @NgField({
        originalDataField: 'jmhdlx',
        dataField: 'jmhdlx',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'jmhdlx',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    jmhdlx: string;

    @NgField({
        originalDataField: 'bz',
        dataField: 'bz',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'bz',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    bz: string;

    @NgField({
        originalDataField: 'hdys',
        dataField: 'hdys',
        originalDataFieldType: 'Number',
        initValue: 0,
        path: 'hdys',
    })
    hdys: any;

    @NgField({
        originalDataField: 'hdfzr',
        dataField: 'hdfzr',
        originalDataFieldType: 'String',
        initValue: '',
        path: 'hdfzr',

        validRules: [
            {
                type: 'maxLength',
                constraints: [36],
                message: '最大长度为36',
            }
        ]
    })
    hdfzr: string;

}